<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:jsf="http://xmlns.jcp.org/jsf"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">

    <h:form>
        <p:commandButton value="REGRESAR AL LISTADO DE TIENDAS" 
                         update=":panelContent">
            <f:setPropertyActionListener
                target="#{navigationController.navigationContent}"
                value="./pages/administration/storehouse_view.xhtml" />
        </p:commandButton>
    </h:form>
    <hr/>
    <h:form>
        <h1><h:outputText value="Create/Edit"/></h1>
        <p:panelGrid columns="2">
            <p:outputLabel value="Name:" for="name" />
            <p:inputText id="name" value="#{shopRoleController.storehouse.name}" title="Name" required="true"
                         onblur="value=value.toUpperCase()"/>
            <p:outputLabel value="Address:" for="address" />
            <p:inputText id="address" value="#{shopRoleController.storehouse.address}" title="Address" />
            <p:outputLabel value="Phone:" for="phone" />
            <p:inputText id="phone" value="#{shopRoleController.storehouse.phone}" title="Phone" />
        </p:panelGrid>
        <hr/>
        <p:commandButton value="Guardar Información" 
                         action="#{shopRoleController.saveOrUpdateStorehouse()}"
                         update="@form" />
    </h:form>

</ui:composition>
